var windowName = "news";
var Page,news;
apiready = function(){

    // onWindowShow(function () {
    // })
    onWindowHide(function () {
    })

    news = new List()
    Page = createVM("#Page",{
        //页面数据
        list:[
        ],
    },{
        //页面方法
        "init":function () {
            this.list = getLocData("Messages")
            showLoading()
            var _this = this;
            news.setUrl("/api/my/messages")
                .setData({})
                .setCbFunc(function (data) {
                    log(data)
                    _this.list = data
                    setLocData("Messages",data)
                    clearLoading()
                });
            news.getList()
        },
        OnPullDownRefresh:function () {
            // startPullDownRefresh()
            // news.reload()
        },
        OnPullUpLoadMore:function () {
            startPullUpLoadMore()
            news.getList()
        },
    })
    Page.init()
}

